package com.platform.common.web.utils;
/**
 * Licensed to the Apache Software Foundation （ASF） under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * （the "License"）； you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * <p>
 * https://www.q3z3.com
 * QQ : 939313737
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.util.List;

/**
 * 分页对象
 */
public class Pager<T> {

    protected Integer offset; // 从第几条开始查
    protected Integer limit; // 查询条数
    protected Integer current; // 当前页
    private Long count;// 总数
    private List<T> dataList;// 数据

    public Pager() {
        super();
        this.offset = 0;
        this.limit = 10;
        this.current = 1;
    }

    public Pager(Integer offset, Integer limit, Integer current) {
        super();
        this.offset = offset;
        this.limit = limit;
        this.current = current;
    }

    public Pager(Long count, List<T> dataList) {
        super();
        this.count = count;
        this.dataList = dataList;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public List<T> getDataList() {
        return dataList;
    }

    public void setDataList(List<T> dataList) {
        this.dataList = dataList;
    }
}
